package org.spring.boot.custom.ws;

import org.spring.boot.custom.config.CustomConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author: eastcom
 * @desc:
 **/
@RestController
@RequestMapping("/custom/config")
public class CustomConfigWs {

	@Autowired(required = false)
	private CustomConfig customConfig;

	@RequestMapping("/list/string")
	public List<String> queryEventId(){
		return customConfig.getEventIds();
	}

	@RequestMapping("/map")
	public Map<String, Object> queryMap(){
		return  customConfig.getRelationParam();
	}

	@RequestMapping("/array")
	public String[] queryArray(){
		return customConfig.getArrayValues();
	}
}
